﻿<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?>
<?php require_once('header.html')?>
<script>
    KindEditor.ready(function (K) {
        var editor = K.editor({
            uploadJson: '/common/kindeditor/php/upload_json.php?mark=1',
            allowFileManager: true
        });
        function initimg() {
            editor.loadPlugin('image', function () {
                editor.plugin.imageDialog({
                    imageUrl: K('#url1').val(),
                    clickFn: function (url, title, width, height, border, align) {
                        K('#pimgurl').val(url);
                        K('#img_tag').attr('src', url);
                        editor.hideDialog();
                    }
                });
            });
        }
        K('#img_tag').click(function () {
            initimg();
        });
        K('#pimgurl').dblclick(function () {
            initimg();
        });
        UE.getEditor('pcontents');
    });
</script>
<div id="dcMain">
    <!-- 当前位置 -->
    <div id="urHere">DouPHP 管理中心<b>></b><strong>商品添加</strong> </div>   <div id="manager" class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3><a href="<?php echo site_url('admin/product/productlist')?>" class="actionBtn">返回列表</a>商品添加</h3>
        <form action="<?php echo site_url('admin/product/add_product')?>" method="post">
            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <tr>
                    <td width="100" align="right">产品名称</td>
                    <td>
                        <input type="text" name="ptitle" size="40" class="inpMain" value="" />
                    </td>
                </tr>
                <tr>
                    <td width="100" align="right">产品图片</td>
                    <td>
                        <img id="img_tag" src="" onerror="this.src='<?php echo base_url('common')?>/images/nopic.png'" style="height:100px;width:100px;cursor:pointer;" />
                        <input type="text" id="pimgurl" name="pimgurl" size="40" class="inpMain" value="" readonly="readonly" />
                    </td>
                </tr>
                <tr>
                    <td align="right">内容</td>
                    <td>
                       
                      <textarea name="pcontents" id="pcontents" style="height:500px;width:700px;"></textarea>
                    </td>
                </tr>
                <tr>
                    <td align="right">热点</td>
                    <td>
                        <select name="pishot">
                            <option value="1">是</option>
                            <option value="0" selected="selected">否</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>
                        <input type="submit" class="btn" value="添加" />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>